<template>
	<view class="page" :style="{'min-height':h+'px'}">
		<u-navbar title="支付完成" :leftIconSize="36" bgColor="#ffffff" leftIconColor="#111111" :titleStyle="titleStyle">
			<view class="u-nav-slot" slot="left">
				<u-icon name="arrow-left" size="36" @tap="toBack"></u-icon>
				<u-line direction="column" :hairline="false" length="0" margin="0 15rpx"></u-line>
				<u-icon name="home" size="40" @tap="toHome"></u-icon>
			</view>
		</u-navbar>
		<view class="content" :style="{'margin-top':mt+'px'}">
			<view class="result">
				<image src="https://i.ringzle.com/file/20240110/1d70be22d18642ca9efd9ed4297dddaa.jpg"></image>
				<text>支付成功</text>
				<view>￥<span>{{object.price}}</span></view>
			</view>
			<view class="btns">
				<view @tap="toDetails">订单详情</view>
				<view @tap="toOrder">去预约</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				h: uni.getSystemInfoSync().windowHeight,
				mt: uni.getSystemInfoSync().statusBarHeight + 44,
				titleStyle: {
					fontSize: '36rpx',
					fontWeight: "bold",
					color: "#111111"
				},
				object:null
			}
		},
		onLoad(option) {
			if(option.object) this.object = JSON.parse(option.object);
		},
		methods: {
			toDetails(){
				uni.redirectTo({
					url:'/pagesMy/seaFishingOrder/details?id='+this.object.id
				})
			},
			toOrder(){
				uni.redirectTo({
					url:'/pagesIndex/seaFishing/index'
				})
			},
			toBack(){
				uni.navigateBack()
			},
			toHome(){
				uni.reLaunch({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style scoped lang="less">
	/deep/.u-nav-slot{
		display: flex;
	}
	
	.page{
		.content{
			width: 100%;
			padding: 64rpx 40rpx;
			box-sizing: border-box;
			.result{
				display: flex;
				flex-direction: column;
				align-items: center;
				image{
					width: 96rpx;
					height: 96rpx;
				}
				&>text{
					font-size: 32rpx;
					font-family: PingFang-SC-Bold, PingFang-SC;
					font-weight: bold;
					color: #111111;
					margin-top: 20rpx;
				}
				&>view{
					font-size: 36rpx;
					font-family: ArialMT;
					color: #333333;
					margin-top: 20rpx;
					span{
						font-size: 48rpx;
						font-family: Arial-BoldMT, Arial;
						font-weight: normal;
						color: #333333;
					}
				}
			}
			
			.btns{
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 268rpx;
				&>view{
					width: calc(50% - 22rpx);
					height: 88rpx;
					border-radius: 46rpx;
					border: 2rpx solid #CCCCCC;
					line-height: 88rpx;
					text-align: center;
					font-size: 32rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					&:last-child{
						border: 2rpx solid #007A69;
						color: #007A69;
					}
				}
			}
		}
	}
</style>